package backend;
/**
*
* @author Christian Janke, Simon Huneck
*/
public class MapEdge {
   
   private MapNode node1;
   private MapNode node2;
   private double length;
   private double speed;
   private String liegtAuf;
   
   public MapEdge(MapNode s, MapNode z, double l, double speed, String n){
       this.node1 = s;
       this.node2 = z;
       this.length = l; 
       this.speed = speed;
       this.liegtAuf = n;
   }
   
   public void setLength(double g){
       this.length = g;
   }
   
   public double getLength(){
       return this.length;
   }
   
   public double getTime(){
       return (this.length / this.speed);
   }
   
   public MapNode getNode1(){
       return this.node1;
   }
   
   public MapNode getNode2(){
       return this.node2;
   }
   
   public double getSpeed(){
       return this.speed;
   }
   
   public String getName(){
       return this.liegtAuf;
   }
}
